#pragma once

#include <string>
#include <vector>
#include "base_noncopyable.h"
#include "base_yaml.h"

namespace El {
namespace Common {

class ProductDefinition {
    DISALLOW_COPY_AND_MOVE(ProductDefinition);

public:
    static ProductDefinition &GetInstance();

    ProductDefinition() = default;
    ~ProductDefinition() = default;

    bool LoadFromFile(const std::string &yamlFile);

    bool GetValue(const std::string &key, std::string &value) const;

    bool GetValue(const std::string &key, std::vector<std::string> &value) const;

private:
    Base::YamlValue config_;  // 使用我们自己的YamlValue
};

} // namespace Common
} // namespace El
